home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / Appearance.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  64.3 KB  |  1,743 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Appearance.a
  3. ;
  4. ;    Contains:    Appearance Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Allegro
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__APPEARANCE__') = 'UNDEFINED' THEN
  18. __APPEARANCE__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  24.     include 'Quickdraw.a'
  25.     ENDIF
  26.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  27.     include 'TextEdit.a'
  28.     ENDIF
  29.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  30.     include 'QDOffscreen.a'
  31.     ENDIF
  32.     IF &TYPE('__MACWINDOWS__') = 'UNDEFINED' THEN
  33.     include 'MacWindows.a'
  34.     ENDIF
  35.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  36.     include 'Controls.a'
  37.     ENDIF
  38.  
  39. ; ——————————————————————————————————————————————————————————————————————————————————
  40. ;  Appearance Manager constants, etc.                                                
  41. ; ——————————————————————————————————————————————————————————————————————————————————
  42.  
  43.                                                             ; Appearance Trap Number 
  44. _AppearanceDispatch                EQU        $AA74
  45. ;  Gestalt selector and values for the Appearance Manager 
  46.  
  47. gestaltAppearanceAttr            EQU        'appr'
  48. gestaltAppearanceExists            EQU        0
  49. gestaltAppearanceCompatMode        EQU        1
  50. ;  Gestalt selector for determining Appearance Manager version      
  51. ;  If this selector does not exist, but gestaltAppearanceAttr     
  52. ;  does, it indicates that the 1.0 version is installed. This     
  53. ;  gestalt returns a BCD number representing the version of the     
  54. ;  Appearance Manager that is currently running, e.g. 0x0101 for 
  55. ;  version 1.0.1.                                                 
  56.  
  57. gestaltAppearanceVersion        EQU        'apvr'
  58. ;  Appearance Manager Apple Events (1.1 and later)                 
  59.  
  60. kAppearanceEventClass            EQU        'appr'                ; Event Class 
  61. kAEAppearanceChanged            EQU        'thme'                ; Appearance changed (e.g. platinum to hi-tech) 
  62. kAESystemFontChanged            EQU        'sysf'                ; system font changed 
  63. kAESmallSystemFontChanged        EQU        'ssfn'                ; small system font changed 
  64. kAEViewsFontChanged                EQU        'vfnt'                ; views font changed 
  65. ; ——————————————————————————————————————————————————————————————————————————————————
  66. ;  Appearance Manager file types                                                    
  67. ; ——————————————————————————————————————————————————————————————————————————————————
  68.  
  69. kThemeDataFileType                EQU        'thme'                ; file type for theme files 
  70. kThemePlatinumFileType            EQU        'pltn'                ; file type for platinum appearance 
  71. kThemeCustomThemesFileType        EQU        'scen'                ; file type for user themes 
  72. kThemeSoundTrackFileType        EQU        'tsnd'
  73. ;  Appearance Manager Error Codes 
  74.  
  75. themeInvalidBrushErr            EQU        -30560                ; pattern index invalid 
  76. themeProcessRegisteredErr        EQU        -30561
  77. themeProcessNotRegisteredErr    EQU        -30562
  78. themeBadTextColorErr            EQU        -30563
  79. themeHasNoAccentsErr            EQU        -30564
  80. themeBadCursorIndexErr            EQU        -30565
  81. themeScriptFontNotFoundErr        EQU        -30566                ; theme font requested for uninstalled script system 
  82. themeMonitorDepthNotSupportedErr EQU    -30567                ; theme not supported at monitor depth 
  83.  
  84. kThemeBrushDialogBackgroundActive EQU    1                    ; Dialogs 
  85. kThemeBrushDialogBackgroundInactive EQU    2                    ; Dialogs 
  86. kThemeBrushAlertBackgroundActive EQU    3
  87. kThemeBrushAlertBackgroundInactive EQU    4
  88. kThemeBrushModelessDialogBackgroundActive EQU 5
  89. kThemeBrushModelessDialogBackgroundInactive EQU 6
  90. kThemeBrushUtilityWindowBackgroundActive EQU 7                ; Miscellaneous 
  91. kThemeBrushUtilityWindowBackgroundInactive EQU 8            ; Miscellaneous 
  92. kThemeBrushListViewSortColumnBackground EQU 9                ; Finder 
  93. kThemeBrushListViewBackground    EQU        10
  94. kThemeBrushIconLabelBackground    EQU        11
  95. kThemeBrushListViewSeparator    EQU        12
  96. kThemeBrushChasingArrows        EQU        13
  97. kThemeBrushDragHilite            EQU        14
  98. kThemeBrushDocumentWindowBackground EQU    15
  99. kThemeBrushFinderWindowBackground EQU    16
  100. ;  Brushes available in Appearance 1.1 or later 
  101.  
  102. kThemeBrushScrollBarDelimiterActive EQU    17
  103. kThemeBrushScrollBarDelimiterInactive EQU 18
  104. kThemeBrushFocusHighlight        EQU        19
  105. kThemeBrushPopupArrowActive        EQU        20
  106. kThemeBrushPopupArrowPressed    EQU        21
  107. kThemeBrushPopupArrowInactive    EQU        22
  108. kThemeBrushAppleGuideCoachmark    EQU        23
  109. kThemeBrushIconLabelBackgroundSelected EQU 24
  110. kThemeBrushStaticAreaFill        EQU        25
  111. kThemeBrushActiveAreaFill        EQU        26
  112. kThemeBrushButtonFrameActive    EQU        27
  113. kThemeBrushButtonFrameInactive    EQU        28
  114. kThemeBrushButtonFaceActive        EQU        29
  115. kThemeBrushButtonFaceInactive    EQU        30
  116. kThemeBrushButtonFacePressed    EQU        31
  117. kThemeBrushButtonActiveDarkShadow EQU    32
  118. kThemeBrushButtonActiveDarkHighlight EQU 33
  119. kThemeBrushButtonActiveLightShadow EQU    34
  120. kThemeBrushButtonActiveLightHighlight EQU 35
  121. kThemeBrushButtonInactiveDarkShadow EQU    36
  122. kThemeBrushButtonInactiveDarkHighlight EQU 37
  123. kThemeBrushButtonInactiveLightShadow EQU 38
  124. kThemeBrushButtonInactiveLightHighlight EQU 39
  125. kThemeBrushButtonPressedDarkShadow EQU    40
  126. kThemeBrushButtonPressedDarkHighlight EQU 41
  127. kThemeBrushButtonPressedLightShadow EQU    42
  128. kThemeBrushButtonPressedLightHighlight EQU 43
  129. kThemeBrushBevelActiveLight        EQU        44
  130. kThemeBrushBevelActiveDark        EQU        45
  131. kThemeBrushBevelInactiveLight    EQU        46
  132. kThemeBrushBevelInactiveDark    EQU        47
  133. ;  These values are meta-brushes, specific colors that do not         
  134. ;  change from theme to theme. You can use them instead of using    
  135. ;  direct RGB values.                                                 
  136.  
  137. kThemeBrushBlack                EQU        -1
  138. kThemeBrushWhite                EQU        -2
  139. ; typedef SInt16                         ThemeBrush
  140.  
  141.  
  142. kThemeTextColorDialogActive        EQU        1
  143. kThemeTextColorDialogInactive    EQU        2
  144. kThemeTextColorAlertActive        EQU        3
  145. kThemeTextColorAlertInactive    EQU        4
  146. kThemeTextColorModelessDialogActive EQU    5
  147. kThemeTextColorModelessDialogInactive EQU 6
  148. kThemeTextColorWindowHeaderActive EQU    7
  149. kThemeTextColorWindowHeaderInactive EQU    8
  150. kThemeTextColorPlacardActive    EQU        9
  151. kThemeTextColorPlacardInactive    EQU        10
  152. kThemeTextColorPlacardPressed    EQU        11
  153. kThemeTextColorPushButtonActive    EQU        12
  154. kThemeTextColorPushButtonInactive EQU    13
  155. kThemeTextColorPushButtonPressed EQU    14
  156. kThemeTextColorBevelButtonActive EQU    15
  157. kThemeTextColorBevelButtonInactive EQU    16
  158. kThemeTextColorBevelButtonPressed EQU    17
  159. kThemeTextColorPopupButtonActive EQU    18
  160. kThemeTextColorPopupButtonInactive EQU    19
  161. kThemeTextColorPopupButtonPressed EQU    20
  162. kThemeTextColorIconLabel        EQU        21
  163. kThemeTextColorListView            EQU        22
  164. ;  Text Colors available in Appearance 1.0.1 or later 
  165.  
  166. kThemeTextColorDocumentWindowTitleActive EQU 23
  167. kThemeTextColorDocumentWindowTitleInactive EQU 24
  168. kThemeTextColorMovableModalWindowTitleActive EQU 25
  169. kThemeTextColorMovableModalWindowTitleInactive EQU 26
  170. kThemeTextColorUtilityWindowTitleActive EQU 27
  171. kThemeTextColorUtilityWindowTitleInactive EQU 28
  172. kThemeTextColorPopupWindowTitleActive EQU 29
  173. kThemeTextColorPopupWindowTitleInactive EQU 30
  174. kThemeTextColorRootMenuActive    EQU        31
  175. kThemeTextColorRootMenuSelected    EQU        32
  176. kThemeTextColorRootMenuDisabled    EQU        33
  177. kThemeTextColorMenuItemActive    EQU        34
  178. kThemeTextColorMenuItemSelected    EQU        35
  179. kThemeTextColorMenuItemDisabled    EQU        36
  180. kThemeTextColorPopupLabelActive    EQU        37
  181. kThemeTextColorPopupLabelInactive EQU    38
  182.  
  183. ;  Text colors available in Appearance 1.1 or later 
  184.  
  185. kThemeTextColorTabFrontActive    EQU        39
  186. kThemeTextColorTabNonFrontActive EQU    40
  187. kThemeTextColorTabNonFrontPressed EQU    41
  188. kThemeTextColorTabFrontInactive    EQU        42
  189. kThemeTextColorTabNonFrontInactive EQU    43
  190. kThemeTextColorIconLabelSelected EQU    44
  191. kThemeTextColorBevelButtonStickyActive EQU 45
  192. kThemeTextColorBevelButtonStickyInactive EQU 46
  193. ;  These values are specific colors that do not change from             
  194. ;  theme to theme. You can use them instead of using direct RGB values. 
  195.  
  196. kThemeTextColorBlack            EQU        -1
  197. kThemeTextColorWhite            EQU        -2
  198. ; typedef SInt16                         ThemeTextColor
  199.  
  200. ;  States to draw primitives: disabled, active, and pressed (hilited) 
  201.  
  202. kThemeStateInactive                EQU        0
  203. kThemeStateActive                EQU        1
  204. kThemeStatePressed                EQU        2
  205. ;  obsolete name 
  206.  
  207. kThemeStateDisabled                EQU        0
  208.  
  209. kThemeStatePressedUp            EQU        2                    ; draw with up pressed        (increment/decrement buttons) 
  210. kThemeStatePressedDown            EQU        3                    ; draw with down pressed    (increment/decrement buttons) 
  211. ; typedef UInt32                         ThemeDrawState
  212.  
  213. ; ——————————————————————————————————————————————————————————————————————————————————
  214. ;  Theme cursor selectors available in Appearance 1.1 or later                        
  215. ; ——————————————————————————————————————————————————————————————————————————————————
  216.  
  217. kThemeArrowCursor                EQU        0
  218. kThemeCopyArrowCursor            EQU        1
  219. kThemeAliasArrowCursor            EQU        2
  220. kThemeContextualMenuArrowCursor    EQU        3
  221. kThemeIBeamCursor                EQU        4
  222. kThemeCrossCursor                EQU        5
  223. kThemePlusCursor                EQU        6
  224. kThemeWatchCursor                EQU        7                    ; Can Animate 
  225. kThemeClosedHandCursor            EQU        8
  226. kThemeOpenHandCursor            EQU        9
  227. kThemePointingHandCursor        EQU        10
  228. kThemeCountingUpHandCursor        EQU        11                    ; Can Animate 
  229. kThemeCountingDownHandCursor    EQU        12                    ; Can Animate 
  230. kThemeCountingUpAndDownHandCursor EQU    13                    ; Can Animate 
  231. kThemeSpinningCursor            EQU        14                    ; Can Animate 
  232. kThemeResizeLeftCursor            EQU        15
  233. kThemeResizeRightCursor            EQU        16
  234. kThemeResizeLeftRightCursor        EQU        17
  235. ; typedef UInt32                         ThemeCursor
  236.  
  237. ; ——————————————————————————————————————————————————————————————————————————————————
  238. ;  Theme menu bar drawing states                                                    
  239. ; ——————————————————————————————————————————————————————————————————————————————————
  240.  
  241. kThemeMenuBarNormal                EQU        0
  242. kThemeMenuBarSelected            EQU        1
  243. ; typedef UInt16                         ThemeMenuBarState
  244.  
  245. ;  attributes 
  246.  
  247. kThemeMenuSquareMenuBar            EQU        $01
  248. ; ——————————————————————————————————————————————————————————————————————————————————
  249. ;  Theme menu drawing states                                                        
  250. ; ——————————————————————————————————————————————————————————————————————————————————
  251.  
  252. kThemeMenuActive                EQU        0
  253. kThemeMenuSelected                EQU        1
  254. kThemeMenuInactive                EQU        3
  255. ;  obsolete name 
  256.  
  257. kThemeMenuDisabled                EQU        3
  258. ; typedef UInt16                         ThemeMenuState
  259.  
  260. ; ——————————————————————————————————————————————————————————————————————————————————————————
  261. ;  MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground if entire     
  262. ;  menu is inactive                                                                            
  263. ; ——————————————————————————————————————————————————————————————————————————————————————————
  264.  
  265. kThemeMenuTypePullDown            EQU        0
  266. kThemeMenuTypePopUp                EQU        1
  267. kThemeMenuTypeHierarchical        EQU        2
  268. kThemeMenuTypeInactive            EQU        $0100
  269. ; typedef UInt16                         ThemeMenuType
  270.  
  271.  
  272. kThemeMenuItemPlain                EQU        0
  273. kThemeMenuItemHierarchical        EQU        1                    ; item has hierarchical arrow
  274. kThemeMenuItemScrollUpArrow        EQU        2                    ; for scrollable menus, indicates item is scroller
  275. kThemeMenuItemScrollDownArrow    EQU        3
  276. kThemeMenuItemAtTop                EQU        $0100                ; indicates item is being drawn at top of menu
  277. kThemeMenuItemAtBottom            EQU        $0200                ; indicates item is being drawn at bottom of menu
  278. kThemeMenuItemHierBackground    EQU        $0400                ; item is within a hierarchical menu
  279. kThemeMenuItemPopUpBackground    EQU        $0800                ; item is within a popped up menu
  280. kThemeMenuItemHasIcon            EQU        $8000                ; add into non-arrow type when icon present.
  281. ; typedef UInt16                         ThemeMenuItemType
  282.  
  283. ; ——————————————————————————————————————————————————————————————————————————————————————————
  284. ;  Theme Backgrounds                                                                        
  285. ; ——————————————————————————————————————————————————————————————————————————————————————————
  286.  
  287. kThemeBackgroundTabPane            EQU        1
  288. kThemeBackgroundPlacard            EQU        2
  289. kThemeBackgroundWindowHeader    EQU        3
  290. kThemeBackgroundListViewWindowHeader EQU 4
  291. ; typedef UInt32                         ThemeBackgroundKind
  292.  
  293. ; ——————————————————————————————————————————————————————————————————————————————————————————
  294. ;  Theme Collection tags for Get/SetTheme                                                    
  295. ; ——————————————————————————————————————————————————————————————————————————————————————————
  296.  
  297. kThemeNameTag                    EQU        'name'                ; Str255
  298. kThemeAppearanceFileNameTag        EQU        'thme'                ; Str255
  299. kThemeVariantNameTag            EQU        'varn'                ; Str255
  300. kThemeSystemFontTag                EQU        'lgsf'                ; Str255
  301. kThemeSmallSystemFontTag        EQU        'smsf'                ; Str255
  302. kThemeViewsFontTag                EQU        'vfnt'                ; Str255
  303. kThemeViewsFontSizeTag            EQU        'vfsz'                ; SInt16
  304. kThemeDesktopPatternNameTag        EQU        'patn'                ; Str255
  305. kThemeDesktopPatternTag            EQU        'patt'                ; <variable-length data> (flattened pattern)
  306. kThemeDesktopPictureNameTag        EQU        'dpnm'                ; Str255
  307. kThemeDesktopPictureAliasTag    EQU        'dpal'                ; <alias handle>
  308. kThemeDesktopPictureAlignmentTag EQU    'dpan'                ; UInt32
  309. kThemeHighlightColorNameTag        EQU        'hcnm'                ; Str255
  310. kThemeHighlightColorTag            EQU        'hcol'                ; RGBColor
  311. kThemeExamplePictureIDTag        EQU        'epic'                ; SInt16
  312. kThemeSoundsEnabledTag            EQU        'snds'                ; Boolean
  313. kThemeSoundTrackNameTag            EQU        'sndt'                ; Str255
  314. kThemeSoundMaskTag                EQU        'smsk'                ; UInt32
  315. kThemeUserDefinedTag            EQU        'user'                ; Boolean (this should _always_ be true if present - used by Control Panel).
  316. kThemeScrollBarArrowStyleTag    EQU        'sbar'                ; ThemeScrollBarArrowStyle
  317. kThemeScrollBarThumbStyleTag    EQU        'sbth'                ; ThemeScrollBarThumbStyle
  318. kThemeSmoothFontEnabledTag        EQU        'smoo'                ; Boolean
  319. kThemeSmoothFontMinSizeTag        EQU        'smos'                ; UInt16 (must be >= 12 and <= 24)
  320. kThemeDblClickCollapseTag        EQU        'coll'                ; Boolean
  321. ; ——————————————————————————————————————————————————————————————————————————————————————————
  322. ;  Theme Control Settings                                                                    
  323. ; ——————————————————————————————————————————————————————————————————————————————————————————
  324.  
  325. kThemeCheckBoxClassicX            EQU        0                    ; check box with an 'X'
  326. kThemeCheckBoxCheckMark            EQU        1                    ; check box with a real check mark
  327. ; typedef UInt16                         ThemeCheckBoxStyle
  328.  
  329.  
  330. kThemeScrollBarArrowsSingle        EQU        0                    ; single arrow on each end
  331. kThemeScrollBarArrowsLowerRight    EQU        1                    ; double arrows only on right or bottom
  332. ; typedef UInt16                         ThemeScrollBarArrowStyle
  333.  
  334.  
  335. kThemeScrollBarThumbNormal        EQU        0                    ; normal, classic thumb size
  336. kThemeScrollBarThumbProportional EQU    1                    ; proportional thumbs
  337. ; typedef UInt16                         ThemeScrollBarThumbStyle
  338.  
  339. ; ——————————————————————————————————————————————————————————————————————————————————————————
  340. ;  Font constants                                                                            
  341. ; ——————————————————————————————————————————————————————————————————————————————————————————
  342.  
  343. kThemeSystemFont                EQU        0
  344. kThemeSmallSystemFont            EQU        1
  345. kThemeSmallEmphasizedSystemFont    EQU        2
  346. kThemeViewsFont                    EQU        3
  347. ; typedef UInt16                         ThemeFontID
  348.  
  349. ; ——————————————————————————————————————————————————————————————————————————————————————————
  350. ;  Tab constants                                                                            
  351. ; ——————————————————————————————————————————————————————————————————————————————————————————
  352.  
  353. kThemeTabNonFront                EQU        0
  354. kThemeTabNonFrontPressed        EQU        1
  355. kThemeTabNonFrontInactive        EQU        2
  356. kThemeTabFront                    EQU        3
  357. kThemeTabFrontInactive            EQU        4
  358. ; typedef UInt16                         ThemeTabStyle
  359.  
  360.  
  361. kThemeTabNorth                    EQU        0
  362. kThemeTabSouth                    EQU        1
  363. kThemeTabEast                    EQU        2
  364. kThemeTabWest                    EQU        3
  365. ; typedef UInt16                         ThemeTabDirection
  366.  
  367. ;  NOTE ON TAB HEIGHT                                                                        
  368. ;  Use the kThemeSmallTabHeightMax and kThemeLargeTabHeightMax when calculating the rects    
  369. ;  to draw tabs into. This height includes the tab frame overlap. Tabs that are not in the    
  370. ;  front are only drawn down to where they meet the frame, as if the height was just        
  371. ;  kThemeLargeTabHeight, for example, as opposed to the ...Max constant. Remember that for    
  372. ;  East and West tabs, the height referred to below is actually the width.                    
  373.  
  374. kThemeSmallTabHeight            EQU        16                    ; amount small tabs protrude from frame.
  375. kThemeLargeTabHeight            EQU        21                    ; amount large tabs protrude from frame.
  376. kThemeTabPaneOverlap            EQU        3                    ; amount tabs overlap frame.
  377. kThemeSmallTabHeightMax            EQU        19                    ; small tab height + overlap
  378. kThemeLargeTabHeightMax            EQU        24                    ; large tab height + overlap
  379. ; ——————————————————————————————————————————————————————————————————————————————————————————
  380. ;  Track kinds                                                                                
  381. ; ——————————————————————————————————————————————————————————————————————————————————————————
  382.  
  383. kThemeScrollBar                    EQU        0
  384. kThemeSmallScrollBar            EQU        1
  385. kThemeSlider                    EQU        2
  386. kThemeProgressBar                EQU        3
  387. kThemeIndeterminateBar            EQU        4
  388. ; typedef UInt16                         ThemeTrackKind
  389.  
  390. ; ——————————————————————————————————————————————————————————————————————————————————————————
  391. ;  Track enable states                                                                        
  392. ; ——————————————————————————————————————————————————————————————————————————————————————————
  393.  
  394.                                                             ; track states 
  395. kThemeTrackActive                EQU        0
  396. kThemeTrackDisabled                EQU        1
  397. kThemeTrackNothingToScroll        EQU        2
  398. ; typedef UInt8                         ThemeTrackEnableState
  399.  
  400. ; ——————————————————————————————————————————————————————————————————————————————————————————
  401. ;  Track pressed states                                                                        
  402. ; ——————————————————————————————————————————————————————————————————————————————————————————
  403.  
  404.                                                             ; press states (ignored unless track is active) 
  405. kThemeLeftOutsideArrowPressed    EQU        $01
  406. kThemeLeftInsideArrowPressed    EQU        $02
  407. kThemeLeftTrackPressed            EQU        $04
  408. kThemeThumbPressed                EQU        $08
  409. kThemeRightTrackPressed            EQU        $10
  410. kThemeRightInsideArrowPressed    EQU        $20
  411. kThemeRightOutsideArrowPressed    EQU        $40
  412. kThemeTopOutsideArrowPressed    EQU        $01
  413. kThemeTopInsideArrowPressed        EQU        $02
  414. kThemeTopTrackPressed            EQU        $04
  415. kThemeBottomTrackPressed        EQU        $10
  416. kThemeBottomInsideArrowPressed    EQU        $20
  417. kThemeBottomOutsideArrowPressed    EQU        $40
  418. ; typedef UInt8                         ThemeTrackPressState
  419.  
  420. ; ——————————————————————————————————————————————————————————————————————————————————————————
  421. ;  Thumb directions                                                                            
  422. ; ——————————————————————————————————————————————————————————————————————————————————————————
  423.  
  424.                                                             ; thumb direction 
  425. kThemeThumbPlain                EQU        0
  426. kThemeThumbUpward                EQU        1
  427. kThemeThumbDownward                EQU        2
  428. ; typedef UInt8                         ThemeThumbDirection
  429.  
  430. ; ——————————————————————————————————————————————————————————————————————————————————————————
  431. ;  Track attributes                                                                            
  432. ; ——————————————————————————————————————————————————————————————————————————————————————————
  433.  
  434. kThemeTrackHorizontal            EQU        $01                    ; track is drawn horizontally
  435. kThemeTrackRightToLeft            EQU        $02                    ; track progresses from right to left
  436. kThemeTrackShowThumb            EQU        $04                    ; track's thumb should be drawn
  437. ; typedef UInt16                         ThemeTrackAttributes
  438.  
  439. ; ——————————————————————————————————————————————————————————————————————————————————————————
  440. ;  Track info block                                                                            
  441. ; ——————————————————————————————————————————————————————————————————————————————————————————
  442. ScrollBarTrackInfo        RECORD 0
  443. viewsize                 ds.l    1                ; offset: $0 (0)        ;  current view range size 
  444. pressState                 ds.b    1                ; offset: $4 (4)        ;  pressed parts state 
  445.                          ORG 6
  446. sizeof                     EQU *                    ; size:   $6 (6)
  447.                         ENDR
  448. SliderTrackInfo            RECORD 0
  449. thumbDir                 ds.b    1                ; offset: $0 (0)        ;  thumb direction 
  450. pressState                 ds.b    1                ; offset: $1 (1)        ;  pressed parts state 
  451. sizeof                     EQU *                    ; size:   $2 (2)
  452.                         ENDR
  453. ProgressTrackInfo        RECORD 0
  454. phase                     ds.b    1                ; offset: $0 (0)        ;  phase for indeterminate progress 
  455.                          ORG 2
  456. sizeof                     EQU *                    ; size:   $2 (2)
  457.                         ENDR
  458. ThemeTrackDrawInfo        RECORD 0
  459. kind                     ds.w    1                ; offset: $0 (0)        ;  what kind of track this info is for 
  460. bounds                     ds        Rect            ; offset: $2 (2)        ;  track basis rectangle 
  461. min                         ds.l    1                ; offset: $A (10)        ;  min track value 
  462. max                         ds.l    1                ; offset: $E (14)        ;  max track value 
  463. value                     ds.l    1                ; offset: $12 (18)        ;  current thumb value 
  464. reserved                 ds.l    1                ; offset: $16 (22)
  465. attributes                 ds.w    1                ; offset: $1A (26)        ;  various track attributes 
  466. enableState                 ds.b    1                ; offset: $1C (28)        ;  enable state 
  467. filler1                     ds.b    1                ; offset: $1D (29)
  468. scrollbar                 ds        ScrollBarTrackInfo ; offset: $1E (30)
  469.                          ORG 30
  470. slider                     ds        SliderTrackInfo ; offset: $1E (30)
  471.                          ORG 30
  472. progress                 ds        ProgressTrackInfo ; offset: $1E (30)
  473.                          ORG 36
  474. sizeof                     EQU *                    ; size:   $24 (36)
  475.                         ENDR
  476. ; ——————————————————————————————————————————————————————————————————————————————————————————
  477. ;  ThemeWindowAttributes                                                                    
  478. ; ——————————————————————————————————————————————————————————————————————————————————————————
  479.  
  480. kThemeWindowHasGrow                EQU        $01                    ; can the size of the window be changed by the user? 
  481. kThemeWindowHasHorizontalZoom    EQU        $08                    ; window can zoom only horizontally 
  482. kThemeWindowHasVerticalZoom        EQU        $10                    ; window can zoom only vertically 
  483. kThemeWindowHasFullZoom            EQU        $18                    ; window zooms in all directions 
  484. kThemeWindowHasCloseBox            EQU        $20                    ; window has a close box 
  485. kThemeWindowHasCollapseBox        EQU        $40                    ; window has a collapse box 
  486. kThemeWindowHasTitleText        EQU        $80                    ; window has a title/title icon 
  487. kThemeWindowIsCollapsed            EQU        $0100                ; window is in the collapsed state 
  488. ; typedef UInt32                         ThemeWindowAttributes
  489.  
  490. ; ——————————————————————————————————————————————————————————————————————————————————————————
  491. ;  Window Types Supported by the Appearance Manager                                            
  492. ; ——————————————————————————————————————————————————————————————————————————————————————————
  493.  
  494. kThemeDocumentWindow            EQU        0
  495. kThemeDialogWindow                EQU        1
  496. kThemeMovableDialogWindow        EQU        2
  497. kThemeAlertWindow                EQU        3
  498. kThemeMovableAlertWindow        EQU        4
  499. kThemePlainDialogWindow            EQU        5
  500. kThemeShadowDialogWindow        EQU        6
  501. kThemePopupWindow                EQU        7
  502. kThemeUtilityWindow                EQU        8
  503. kThemeUtilitySideWindow            EQU        9
  504. ; typedef UInt16                         ThemeWindowType
  505.  
  506. ; ——————————————————————————————————————————————————————————————————————————————————————————
  507. ;  Window Widgets Supported by the Appearance Manager                                        
  508. ; ——————————————————————————————————————————————————————————————————————————————————————————
  509.  
  510. kThemeWidgetCloseBox            EQU        0
  511. kThemeWidgetZoomBox                EQU        1
  512. kThemeWidgetCollapseBox            EQU        2
  513. ; typedef UInt16                         ThemeTitleBarWidget
  514.  
  515. ; ——————————————————————————————————————————————————————————————————————————————————————————
  516. ;  Popup arrow orientations                                                                    
  517. ; ——————————————————————————————————————————————————————————————————————————————————————————
  518.  
  519. kThemeArrowLeft                    EQU        0
  520. kThemeArrowDown                    EQU        1
  521. kThemeArrowRight                EQU        2
  522. kThemeArrowUp                    EQU        3
  523. ; typedef UInt16                         ThemeArrowOrientation
  524.  
  525. ; ——————————————————————————————————————————————————————————————————————————————————————————
  526. ;  Popup arrow sizes                                                                        
  527. ; ——————————————————————————————————————————————————————————————————————————————————————————
  528.  
  529. kThemeArrow3pt                    EQU        0
  530. kThemeArrow5pt                    EQU        1
  531. kThemeArrow7pt                    EQU        2
  532. kThemeArrow9pt                    EQU        3
  533. ; typedef UInt16                         ThemePopupArrowSize
  534.  
  535. ; ——————————————————————————————————————————————————————————————————————————————————————————
  536. ;  Grow box directions                                                                        
  537. ; ——————————————————————————————————————————————————————————————————————————————————————————
  538.  
  539. kThemeGrowLeft                    EQU        $01                    ; can grow to the left 
  540. kThemeGrowRight                    EQU        $02                    ; can grow to the right 
  541. kThemeGrowUp                    EQU        $04                    ; can grow up 
  542. kThemeGrowDown                    EQU        $08                    ; can grow down 
  543. ; typedef UInt16                         ThemeGrowDirection
  544.  
  545. ; ——————————————————————————————————————————————————————————————————————————————————————————
  546. ;  Button kinds                                                                                
  547. ; ——————————————————————————————————————————————————————————————————————————————————————————
  548.  
  549. kThemePushButton                EQU        0
  550. kThemeCheckBox                    EQU        1
  551. kThemeRadioButton                EQU        2
  552. kThemeBevelButton                EQU        3                    ; bevel button (obsolete) 
  553. kThemeArrowButton                EQU        4                    ; popup button without text  (no label) 
  554. kThemePopupButton                EQU        5                    ; popup button 
  555. kThemeDisclosureButton            EQU        6
  556. kThemeIncDecButton                EQU        7                    ; increment/decrement buttons  (no label) 
  557. kThemeSmallBevelButton            EQU        8                    ; small-shadow bevel button 
  558. kThemeMediumBevelButton            EQU        3                    ; med-shadow bevel button 
  559. kThemeLargeBevelButton            EQU        9                    ; large-shadow bevel button 
  560. ; typedef UInt16                         ThemeButtonKind
  561.  
  562. ; ——————————————————————————————————————————————————————————————————————————————————————————
  563. ;  Common button values                                                                        
  564. ; ——————————————————————————————————————————————————————————————————————————————————————————
  565.  
  566. kThemeButtonOff                    EQU        0
  567. kThemeButtonOn                    EQU        1
  568. kThemeButtonMixed                EQU        2
  569. kThemeDisclosureRight            EQU        0
  570. kThemeDisclosureDown            EQU        1
  571. kThemeDisclosureLeft            EQU        2
  572. ; typedef UInt16                         ThemeButtonValue
  573.  
  574. ; ——————————————————————————————————————————————————————————————————————————————————————————
  575. ;  Button adornment types                                                                    
  576. ; ——————————————————————————————————————————————————————————————————————————————————————————
  577.  
  578. kThemeAdornmentNone                EQU        0
  579. kThemeAdornmentDefault            EQU        $01                    ; if set, draw default ornamentation ( push button only ) 
  580. kThemeAdornmentFocus            EQU        $04                    ; if set, draw focus 
  581. kThemeAdornmentRightToLeft        EQU        $10                    ; if set, draw right to left label 
  582. kThemeAdornmentDrawIndicatorOnly EQU    $20                    ; if set, don't draw or erase label ( radio, check, disclosure ) 
  583. ; typedef UInt16                         ThemeButtonAdornment
  584.  
  585. ; ——————————————————————————————————————————————————————————————————————————————————————————
  586. ;  Button drawing info block                                                                
  587. ; ——————————————————————————————————————————————————————————————————————————————————————————
  588. ThemeButtonDrawInfo        RECORD 0
  589. state                     ds.l    1                ; offset: $0 (0)
  590. value                     ds.w    1                ; offset: $4 (4)
  591. adornment                 ds.w    1                ; offset: $6 (6)
  592. sizeof                     EQU *                    ; size:   $8 (8)
  593.                         ENDR
  594. ; typedef struct ThemeButtonDrawInfo *    ThemeButtonDrawInfoPtr
  595.  
  596. ; ——————————————————————————————————————————————————————————————————————————————————————————
  597. ;  Sound Support                                                                            
  598. ; ——————————————————————————————————————————————————————————————————————————————————————————
  599. ; ——————————————————————————————————————————————————————————————————————————————————————————
  600. ;  Sound classes                                                                            
  601. ;                                                                                             
  602. ;  You can use the constants below to set what sounds are active using the SetTheme API.    
  603. ;  Use these with the kThemeSoundMask tag.                                                    
  604. ; ——————————————————————————————————————————————————————————————————————————————————————————
  605.  
  606. kThemeNoSounds                    EQU        0
  607. kThemeWindowSoundsMask            EQU        $01
  608. kThemeMenuSoundsMask            EQU        $02
  609. kThemeControlSoundsMask            EQU        $04
  610. kThemeFinderSoundsMask            EQU        $08
  611.  
  612. ; ——————————————————————————————————————————————————————————————————————————————————————————
  613. ;  Drag Sounds                                                                                
  614. ;                                                                                             
  615. ;  Drag sounds are looped for the duration of the drag.                                        
  616. ;                                                                                             
  617. ;  Call BeginThemeDragSound at the start of the drag.                                        
  618. ;  Call EndThemeDragSound when the drag has finished.                                        
  619. ;                                                                                             
  620. ;  Note that in order to maintain a consistent user experience, only one drag sound may     
  621. ;  occur at a time.  The sound should be attached to a mouse action, start after the         
  622. ;  mouse goes down and stop when the mouse is released.                                        
  623. ; ——————————————————————————————————————————————————————————————————————————————————————————
  624.  
  625. kThemeDragSoundNone                EQU        0
  626. kThemeDragSoundMoveWindow        EQU        'wmov'
  627. kThemeDragSoundGrowWindow        EQU        'wgro'
  628. kThemeDragSoundMoveUtilWindow    EQU        'umov'
  629. kThemeDragSoundGrowUtilWindow    EQU        'ugro'
  630. kThemeDragSoundMoveDialog        EQU        'dmov'
  631. kThemeDragSoundMoveAlert        EQU        'amov'
  632. kThemeDragSoundMoveIcon            EQU        'imov'
  633. kThemeDragSoundSliderThumb        EQU        'slth'
  634. kThemeDragSoundSliderGhost        EQU        'slgh'
  635. kThemeDragSoundScrollBarThumb    EQU        'sbth'
  636. kThemeDragSoundScrollBarGhost    EQU        'sbgh'
  637. kThemeDragSoundScrollBarArrowDecreasing EQU 'sbad'
  638. kThemeDragSoundScrollBarArrowIncreasing EQU 'sbai'
  639. kThemeDragSoundDragging            EQU        'drag'
  640. ; typedef OSType                         ThemeDragSoundKind
  641.  
  642. ; ——————————————————————————————————————————————————————————————————————————
  643. ;  State-change sounds                                                        
  644. ;                                                                             
  645. ;  State-change sounds are played asynchonously as a one-shot.                
  646. ;                                                                             
  647. ;  Call PlayThemeSound to play the sound.  The sound will play                
  648. ;  asynchronously until complete, then stop automatically.                    
  649. ; ——————————————————————————————————————————————————————————————————————————
  650.  
  651. kThemeSoundNone                    EQU        0
  652. kThemeSoundMenuOpen                EQU        'mnuo'                ; menu sounds 
  653. kThemeSoundMenuClose            EQU        'mnuc'
  654. kThemeSoundMenuItemHilite        EQU        'mnui'
  655. kThemeSoundMenuItemRelease        EQU        'mnus'
  656. kThemeSoundWindowClosePress        EQU        'wclp'                ; window sounds 
  657. kThemeSoundWindowCloseEnter        EQU        'wcle'
  658. kThemeSoundWindowCloseExit        EQU        'wclx'
  659. kThemeSoundWindowCloseRelease    EQU        'wclr'
  660. kThemeSoundWindowZoomPress        EQU        'wzmp'
  661. kThemeSoundWindowZoomEnter        EQU        'wzme'
  662. kThemeSoundWindowZoomExit        EQU        'wzmx'
  663. kThemeSoundWindowZoomRelease    EQU        'wzmr'
  664. kThemeSoundWindowCollapsePress    EQU        'wcop'
  665. kThemeSoundWindowCollapseEnter    EQU        'wcoe'
  666. kThemeSoundWindowCollapseExit    EQU        'wcox'
  667. kThemeSoundWindowCollapseRelease EQU    'wcor'
  668. kThemeSoundWindowDragBoundary    EQU        'wdbd'
  669. kThemeSoundUtilWinClosePress    EQU        'uclp'                ; utility window sounds 
  670. kThemeSoundUtilWinCloseEnter    EQU        'ucle'
  671. kThemeSoundUtilWinCloseExit        EQU        'uclx'
  672. kThemeSoundUtilWinCloseRelease    EQU        'uclr'
  673. kThemeSoundUtilWinZoomPress        EQU        'uzmp'
  674. kThemeSoundUtilWinZoomEnter        EQU        'uzme'
  675. kThemeSoundUtilWinZoomExit        EQU        'uzmx'
  676. kThemeSoundUtilWinZoomRelease    EQU        'uzmr'
  677. kThemeSoundUtilWinCollapsePress    EQU        'ucop'
  678. kThemeSoundUtilWinCollapseEnter    EQU        'ucoe'
  679. kThemeSoundUtilWinCollapseExit    EQU        'ucox'
  680. kThemeSoundUtilWinCollapseRelease EQU    'ucor'
  681. kThemeSoundUtilWinDragBoundary    EQU        'udbd'
  682. kThemeSoundWindowOpen            EQU        'wopn'                ; window close and zoom action 
  683. kThemeSoundWindowClose            EQU        'wcls'
  684. kThemeSoundWindowZoomIn            EQU        'wzmi'
  685. kThemeSoundWindowZoomOut        EQU        'wzmo'
  686. kThemeSoundWindowCollapseUp        EQU        'wcol'
  687. kThemeSoundWindowCollapseDown    EQU        'wexp'
  688. kThemeSoundWindowActivate        EQU        'wact'
  689. kThemeSoundUtilWindowOpen        EQU        'uopn'
  690. kThemeSoundUtilWindowClose        EQU        'ucls'
  691. kThemeSoundUtilWindowZoomIn        EQU        'uzmi'
  692. kThemeSoundUtilWindowZoomOut    EQU        'uzmo'
  693. kThemeSoundUtilWindowCollapseUp    EQU        'ucol'
  694. kThemeSoundUtilWindowCollapseDown EQU    'uexp'
  695. kThemeSoundUtilWindowActivate    EQU        'uact'
  696. kThemeSoundDialogOpen            EQU        'dopn'
  697. kThemeSoundDialogClose            EQU        'dlgc'
  698. kThemeSoundAlertOpen            EQU        'aopn'
  699. kThemeSoundAlertClose            EQU        'altc'
  700. kThemeSoundPopupWindowOpen        EQU        'pwop'
  701. kThemeSoundPopupWindowClose        EQU        'pwcl'
  702. kThemeSoundButtonPress            EQU        'btnp'                ; button 
  703. kThemeSoundButtonEnter            EQU        'btne'
  704. kThemeSoundButtonExit            EQU        'btnx'
  705. kThemeSoundButtonRelease        EQU        'btnr'
  706. kThemeSoundDefaultButtonPress    EQU        'dbtp'                ; default button 
  707. kThemeSoundDefaultButtonEnter    EQU        'dbte'
  708. kThemeSoundDefaultButtonExit    EQU        'dbtx'
  709. kThemeSoundDefaultButtonRelease    EQU        'dbtr'
  710. kThemeSoundCancelButtonPress    EQU        'cbtp'                ; cancel button 
  711. kThemeSoundCancelButtonEnter    EQU        'cbte'
  712. kThemeSoundCancelButtonExit        EQU        'cbtx'
  713. kThemeSoundCancelButtonRelease    EQU        'cbtr'
  714. kThemeSoundCheckboxPress        EQU        'chkp'                ; checkboxes 
  715. kThemeSoundCheckboxEnter        EQU        'chke'
  716. kThemeSoundCheckboxExit            EQU        'chkx'
  717. kThemeSoundCheckboxRelease        EQU        'chkr'
  718. kThemeSoundRadioPress            EQU        'radp'                ; radio buttons 
  719. kThemeSoundRadioEnter            EQU        'rade'
  720. kThemeSoundRadioExit            EQU        'radx'
  721. kThemeSoundRadioRelease            EQU        'radr'
  722. kThemeSoundScrollArrowPress        EQU        'sbap'                ; scroll bars 
  723. kThemeSoundScrollArrowEnter        EQU        'sbae'
  724. kThemeSoundScrollArrowExit        EQU        'sbax'
  725. kThemeSoundScrollArrowRelease    EQU        'sbar'
  726. kThemeSoundScrollEndOfTrack        EQU        'sbte'
  727. kThemeSoundScrollTrackPress        EQU        'sbtp'
  728. kThemeSoundSliderEndOfTrack        EQU        'slte'                ; sliders 
  729. kThemeSoundSliderTrackPress        EQU        'sltp'
  730. kThemeSoundBalloonOpen            EQU        'blno'                ; help balloons 
  731. kThemeSoundBalloonClose            EQU        'blnc'
  732. kThemeSoundBevelPress            EQU        'bevp'                ; Bevel buttons 
  733. kThemeSoundBevelEnter            EQU        'beve'
  734. kThemeSoundBevelExit            EQU        'bevx'
  735. kThemeSoundBevelRelease            EQU        'bevr'
  736. kThemeSoundLittleArrowUpPress    EQU        'laup'                ; Little Arrows 
  737. kThemeSoundLittleArrowDnPress    EQU        'ladp'
  738. kThemeSoundLittleArrowEnter        EQU        'lare'
  739. kThemeSoundLittleArrowExit        EQU        'larx'
  740. kThemeSoundLittleArrowUpRelease    EQU        'laur'
  741. kThemeSoundLittleArrowDnRelease    EQU        'ladr'
  742. kThemeSoundPopupPress            EQU        'popp'                ; Popup Buttons 
  743. kThemeSoundPopupEnter            EQU        'pope'
  744. kThemeSoundPopupExit            EQU        'popx'
  745. kThemeSoundPopupRelease            EQU        'popr'
  746. kThemeSoundDisclosurePress        EQU        'dscp'                ; Disclosure Buttons 
  747. kThemeSoundDisclosureEnter        EQU        'dsce'
  748. kThemeSoundDisclosureExit        EQU        'dscx'
  749. kThemeSoundDisclosureRelease    EQU        'dscr'
  750. kThemeSoundTabPressed            EQU        'tabp'                ; Tabs 
  751. kThemeSoundTabEnter                EQU        'tabe'
  752. kThemeSoundTabExit                EQU        'tabx'
  753. kThemeSoundTabRelease            EQU        'tabr'
  754. kThemeSoundDragTargetHilite        EQU        'dthi'                ; drag manager 
  755. kThemeSoundDragTargetUnhilite    EQU        'dtuh'
  756. kThemeSoundDragTargetDrop        EQU        'dtdr'
  757. kThemeSoundEmptyTrash            EQU        'ftrs'                ; finder 
  758. kThemeSoundSelectItem            EQU        'fsel'
  759. kThemeSoundNewItem                EQU        'fnew'
  760. kThemeSoundReceiveDrop            EQU        'fdrp'
  761. kThemeSoundCopyDone                EQU        'fcpd'
  762. kThemeSoundResolveAlias            EQU        'fral'
  763. kThemeSoundLaunchApp            EQU        'flap'
  764. kThemeSoundDiskInsert            EQU        'dski'
  765. kThemeSoundDiskEject            EQU        'dske'
  766. kThemeSoundFinderDragOnIcon        EQU        'fdon'
  767. kThemeSoundFinderDragOffIcon    EQU        'fdof'
  768. ; typedef OSType                         ThemeSoundKind
  769.  
  770. ; ——————————————————————————————————————————————————————————————————————————————————————————
  771. ;  Window Metrics                                                                            
  772. ; ——————————————————————————————————————————————————————————————————————————————————————————
  773. ;      Window metrics are used by the Appearance manager to fill in the blanks necessary to     
  774. ;      draw windows. If a value is not appropriate for the type of window, be sure to fill in    
  775. ;      the slot in the structure with zero.    For the popupTabOffset parameter, you can pass a
  776. ;      real value based on the left edge of the window. This value might be interpreted in a     
  777. ;      different manner when depending on the value of the popupTabPosition field. The values    
  778. ;      you can pass into popupTabPosition are:                                                    
  779. ;                                                                                             
  780. ;     kThemePopupTabNormalPosition                                                            
  781. ;         Starts the tab left edge at the position indicated by the popupTabOffset field.        
  782. ;                                                                                             
  783. ;     kThemePopupTabCenterOnWindow                                                            
  784. ;         tells us to ignore the offset field and instead simply center the width of the         
  785. ;         handle on the window.                                                                
  786. ;                                                                                             
  787. ;     kThemePopupTabCenterOnOffset                                                            
  788. ;         tells us to center the width of the handle around the value passed in offset.        
  789. ;                                                                                             
  790. ;      The Appearance Manager will try its best to accomodate the requested placement, but may 
  791. ;      move the handle slightly to make it fit correctly.                                        
  792. ;                                                                                             
  793.  
  794. kThemePopupTabNormalPosition    EQU        0
  795. kThemePopupTabCenterOnWindow    EQU        1
  796. kThemePopupTabCenterOnOffset    EQU        2
  797. ThemeWindowMetrics        RECORD 0
  798. metricSize                 ds.w    1                ; offset: $0 (0)        ;  should be always be sizeof( ThemeWindowMetrics )
  799. titleHeight                 ds.w    1                ; offset: $2 (2)
  800. titleWidth                 ds.w    1                ; offset: $4 (4)
  801. popupTabOffset             ds.w    1                ; offset: $6 (6)
  802. popupTabWidth             ds.w    1                ; offset: $8 (8)
  803. popupTabPosition         ds.w    1                ; offset: $A (10)
  804. sizeof                     EQU *                    ; size:   $C (12)
  805.                         ENDR
  806. ; typedef struct ThemeWindowMetrics *    ThemeWindowMetricsPtr
  807.  
  808. ; ——————————————————————————————————————————————————————————————————————————————————————————
  809. ;  Drawing State                                                                            
  810. ; ——————————————————————————————————————————————————————————————————————————————————————————
  811.  
  812.  
  813. ; ——————————————————————————————————————————————————————————————————————————————————————————
  814. ;  Callback procs                                                                            
  815. ; ——————————————————————————————————————————————————————————————————————————————————————————
  816. ; ——————————————————————————————————————————————————————————————————————————————————
  817. ;  Menu Drawing callbacks                                                            
  818. ; ——————————————————————————————————————————————————————————————————————————————————
  819. ; ——————————————————————————————————————————————————————————————————————————————————
  820. ;     Appearance Manager APIs                                                            
  821. ; ——————————————————————————————————————————————————————————————————————————————————
  822. ;  Registering Appearance-Savvy Applications 
  823. ;
  824. ; pascal OSStatus RegisterAppearanceClient(void)
  825. ;
  826.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  827.         Macro
  828.         _RegisterAppearanceClient
  829.             move.w              #$0015,D0
  830.             dc.w                $AA74
  831.         EndM
  832.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  833.         IMPORT_CFM_FUNCTION RegisterAppearanceClient
  834.     ENDIF
  835.  
  836. ;
  837. ; pascal OSStatus UnregisterAppearanceClient(void)
  838. ;
  839.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  840.         Macro
  841.         _UnregisterAppearanceClient
  842.             move.w              #$0016,D0
  843.             dc.w                $AA74
  844.         EndM
  845.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  846.         IMPORT_CFM_FUNCTION UnregisterAppearanceClient
  847.     ENDIF
  848.  
  849. ;
  850. ; pascal Boolean IsAppearanceClient(const ProcessSerialNumber *process)
  851. ;
  852.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  853.         Macro
  854.         _IsAppearanceClient
  855.             move.w              #$FFFF,D0
  856.             dc.w                $AA74
  857.         EndM
  858.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  859.         IMPORT_CFM_FUNCTION IsAppearanceClient
  860.     ENDIF
  861.  
  862. ; *****************************************************************************
  863. ;    NOTES ON THEME BRUSHES
  864. ;    Theme brushes can be either colors or patterns, depending on the theme.
  865. ;    Because of this, you should be prepared to handle the case where a brush
  866. ;    is a pattern and save and restore the pnPixPat and bkPixPat fields of
  867. ;    your GrafPorts when saving the fore and back colors. Also, since patterns
  868. ;    in bkPixPat override the background color of the window, you should use
  869. ;    BackPat to set your background pattern to a normal white pattern. This
  870. ;    will ensure that you can use RGBBackColor to set your back color to white,
  871. ;    call EraseRect and get the expected results.
  872. ;****************************************************************************
  873.  
  874.  
  875. ;
  876. ; pascal OSStatus SetThemePen(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
  877. ;
  878.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  879.         Macro
  880.         _SetThemePen
  881.             move.w              #$0001,D0
  882.             dc.w                $AA74
  883.         EndM
  884.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  885.         IMPORT_CFM_FUNCTION SetThemePen
  886.     ENDIF
  887.  
  888. ;
  889. ; pascal OSStatus SetThemeBackground(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
  890. ;
  891.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  892.         Macro
  893.         _SetThemeBackground
  894.             move.w              #$0002,D0
  895.             dc.w                $AA74
  896.         EndM
  897.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  898.         IMPORT_CFM_FUNCTION SetThemeBackground
  899.     ENDIF
  900.  
  901. ;
  902. ; pascal OSStatus SetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice)
  903. ;
  904.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  905.         Macro
  906.         _SetThemeTextColor
  907.             move.w              #$0003,D0
  908.             dc.w                $AA74
  909.         EndM
  910.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  911.         IMPORT_CFM_FUNCTION SetThemeTextColor
  912.     ENDIF
  913.  
  914. ;
  915. ; pascal OSStatus SetThemeWindowBackground(WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate)
  916. ;
  917.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  918.         Macro
  919.         _SetThemeWindowBackground
  920.             move.w              #$0004,D0
  921.             dc.w                $AA74
  922.         EndM
  923.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  924.         IMPORT_CFM_FUNCTION SetThemeWindowBackground
  925.     ENDIF
  926.  
  927. ;  Window Placards, Headers and Frames 
  928. ;
  929. ; pascal OSStatus DrawThemeWindowHeader(const Rect *inRect, ThemeDrawState inState)
  930. ;
  931.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  932.         Macro
  933.         _DrawThemeWindowHeader
  934.             move.w              #$0005,D0
  935.             dc.w                $AA74
  936.         EndM
  937.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  938.         IMPORT_CFM_FUNCTION DrawThemeWindowHeader
  939.     ENDIF
  940.  
  941. ;
  942. ; pascal OSStatus DrawThemeWindowListViewHeader(const Rect *inRect, ThemeDrawState inState)
  943. ;
  944.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  945.         Macro
  946.         _DrawThemeWindowListViewHeader
  947.             move.w              #$0006,D0
  948.             dc.w                $AA74
  949.         EndM
  950.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  951.         IMPORT_CFM_FUNCTION DrawThemeWindowListViewHeader
  952.     ENDIF
  953.  
  954. ;
  955. ; pascal OSStatus DrawThemePlacard(const Rect *inRect, ThemeDrawState inState)
  956. ;
  957.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  958.         Macro
  959.         _DrawThemePlacard
  960.             move.w              #$0007,D0
  961.             dc.w                $AA74
  962.         EndM
  963.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  964.         IMPORT_CFM_FUNCTION DrawThemePlacard
  965.     ENDIF
  966.  
  967. ;
  968. ; pascal OSStatus DrawThemeEditTextFrame(const Rect *inRect, ThemeDrawState inState)
  969. ;
  970.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  971.         Macro
  972.         _DrawThemeEditTextFrame
  973.             move.w              #$0009,D0
  974.             dc.w                $AA74
  975.         EndM
  976.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  977.         IMPORT_CFM_FUNCTION DrawThemeEditTextFrame
  978.     ENDIF
  979.  
  980. ;
  981. ; pascal OSStatus DrawThemeListBoxFrame(const Rect *inRect, ThemeDrawState inState)
  982. ;
  983.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  984.         Macro
  985.         _DrawThemeListBoxFrame
  986.             move.w              #$000A,D0
  987.             dc.w                $AA74
  988.         EndM
  989.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  990.         IMPORT_CFM_FUNCTION DrawThemeListBoxFrame
  991.     ENDIF
  992.  
  993. ;  Keyboard Focus Drawing 
  994. ;
  995. ; pascal OSStatus DrawThemeFocusRect(const Rect *inRect, Boolean inHasFocus)
  996. ;
  997.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  998.         Macro
  999.         _DrawThemeFocusRect
  1000.             move.w              #$000B,D0
  1001.             dc.w                $AA74
  1002.         EndM
  1003.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1004.         IMPORT_CFM_FUNCTION DrawThemeFocusRect
  1005.     ENDIF
  1006.  
  1007. ;  Dialog Group Boxes and Separators 
  1008. ;
  1009. ; pascal OSStatus DrawThemePrimaryGroup(const Rect *inRect, ThemeDrawState inState)
  1010. ;
  1011.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1012.         Macro
  1013.         _DrawThemePrimaryGroup
  1014.             move.w              #$000C,D0
  1015.             dc.w                $AA74
  1016.         EndM
  1017.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1018.         IMPORT_CFM_FUNCTION DrawThemePrimaryGroup
  1019.     ENDIF
  1020.  
  1021. ;
  1022. ; pascal OSStatus DrawThemeSecondaryGroup(const Rect *inRect, ThemeDrawState inState)
  1023. ;
  1024.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1025.         Macro
  1026.         _DrawThemeSecondaryGroup
  1027.             move.w              #$000D,D0
  1028.             dc.w                $AA74
  1029.         EndM
  1030.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1031.         IMPORT_CFM_FUNCTION DrawThemeSecondaryGroup
  1032.     ENDIF
  1033.  
  1034. ;
  1035. ; pascal OSStatus DrawThemeSeparator(const Rect *inRect, ThemeDrawState inState)
  1036. ;
  1037.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1038.         Macro
  1039.         _DrawThemeSeparator
  1040.             move.w              #$000E,D0
  1041.             dc.w                $AA74
  1042.         EndM
  1043.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1044.         IMPORT_CFM_FUNCTION DrawThemeSeparator
  1045.     ENDIF
  1046.  
  1047. ; —————————————————————————————— BEGIN APPEARANCE 1.0.1 ————————————————————————————————————————————
  1048. ;  The following Appearance Manager APIs are only available 
  1049. ;  in Appearance 1.0.1 or later                             
  1050. ;
  1051. ; pascal OSStatus DrawThemeModelessDialogFrame(const Rect *inRect, ThemeDrawState inState)
  1052. ;
  1053.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1054.         Macro
  1055.         _DrawThemeModelessDialogFrame
  1056.             move.w              #$0008,D0
  1057.             dc.w                $AA74
  1058.         EndM
  1059.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1060.         IMPORT_CFM_FUNCTION DrawThemeModelessDialogFrame
  1061.     ENDIF
  1062.  
  1063. ;
  1064. ; pascal OSStatus DrawThemeGenericWell(const Rect *inRect, ThemeDrawState inState, Boolean inFillCenter)
  1065. ;
  1066.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1067.         Macro
  1068.         _DrawThemeGenericWell
  1069.             move.w              #$0022,D0
  1070.             dc.w                $AA74
  1071.         EndM
  1072.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1073.         IMPORT_CFM_FUNCTION DrawThemeGenericWell
  1074.     ENDIF
  1075.  
  1076. ;
  1077. ; pascal OSStatus DrawThemeFocusRegion(RgnHandle inRegion, Boolean inHasFocus)
  1078. ;
  1079.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1080.         Macro
  1081.         _DrawThemeFocusRegion
  1082.             move.w              #$0023,D0
  1083.             dc.w                $AA74
  1084.         EndM
  1085.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1086.         IMPORT_CFM_FUNCTION DrawThemeFocusRegion
  1087.     ENDIF
  1088.  
  1089. ;
  1090. ; pascal Boolean IsThemeInColor(SInt16 inDepth, Boolean inIsColorDevice)
  1091. ;
  1092.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1093.         Macro
  1094.         _IsThemeInColor
  1095.             move.w              #$0024,D0
  1096.             dc.w                $AA74
  1097.         EndM
  1098.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1099.         IMPORT_CFM_FUNCTION IsThemeInColor
  1100.     ENDIF
  1101.  
  1102. ;  IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will 
  1103. ;  most likely return an error 
  1104. ;
  1105. ; pascal OSStatus GetThemeAccentColors(CTabHandle *outColors)
  1106. ;
  1107.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1108.         Macro
  1109.         _GetThemeAccentColors
  1110.             move.w              #$0025,D0
  1111.             dc.w                $AA74
  1112.         EndM
  1113.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1114.         IMPORT_CFM_FUNCTION GetThemeAccentColors
  1115.     ENDIF
  1116.  
  1117. ;
  1118. ; pascal OSStatus DrawThemeMenuBarBackground(const Rect *inBounds, ThemeMenuBarState inState, UInt32 inAttributes)
  1119. ;
  1120.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1121.         Macro
  1122.         _DrawThemeMenuBarBackground
  1123.             move.w              #$0018,D0
  1124.             dc.w                $AA74
  1125.         EndM
  1126.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1127.         IMPORT_CFM_FUNCTION DrawThemeMenuBarBackground
  1128.     ENDIF
  1129.  
  1130. ;
  1131. ; pascal OSStatus DrawThemeMenuTitle(const Rect *inMenuBarRect, const Rect *inTitleRect, ThemeMenuState inState, UInt32 inAttributes, MenuTitleDrawingUPP inTitleProc, UInt32 inTitleData)
  1132. ;
  1133.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1134.         Macro
  1135.         _DrawThemeMenuTitle
  1136.             move.w              #$0019,D0
  1137.             dc.w                $AA74
  1138.         EndM
  1139.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1140.         IMPORT_CFM_FUNCTION DrawThemeMenuTitle
  1141.     ENDIF
  1142.  
  1143. ;
  1144. ; pascal OSStatus GetThemeMenuBarHeight(SInt16 *outHeight)
  1145. ;
  1146.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1147.         Macro
  1148.         _GetThemeMenuBarHeight
  1149.             move.w              #$001A,D0
  1150.             dc.w                $AA74
  1151.         EndM
  1152.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1153.         IMPORT_CFM_FUNCTION GetThemeMenuBarHeight
  1154.     ENDIF
  1155.  
  1156. ;
  1157. ; pascal OSStatus DrawThemeMenuBackground(const Rect *inMenuRect, ThemeMenuType inMenuType)
  1158. ;
  1159.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1160.         Macro
  1161.         _DrawThemeMenuBackground
  1162.             move.w              #$001B,D0
  1163.             dc.w                $AA74
  1164.         EndM
  1165.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1166.         IMPORT_CFM_FUNCTION DrawThemeMenuBackground
  1167.     ENDIF
  1168.  
  1169. ;
  1170. ; pascal OSStatus GetThemeMenuBackgroundRegion(const Rect *inMenuRect, ThemeMenuType menuType, RgnHandle region)
  1171. ;
  1172.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1173.         Macro
  1174.         _GetThemeMenuBackgroundRegion
  1175.             move.w              #$001C,D0
  1176.             dc.w                $AA74
  1177.         EndM
  1178.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1179.         IMPORT_CFM_FUNCTION GetThemeMenuBackgroundRegion
  1180.     ENDIF
  1181.  
  1182. ;
  1183. ; pascal OSStatus DrawThemeMenuItem(const Rect *inMenuRect, const Rect *inItemRect, SInt16 inVirtualMenuTop, SInt16 inVirtualMenuBottom, ThemeMenuState inState, ThemeMenuItemType inItemType, MenuItemDrawingUPP inDrawProc, UInt32 inUserData)
  1184. ;
  1185.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1186.         Macro
  1187.         _DrawThemeMenuItem
  1188.             move.w              #$001D,D0
  1189.             dc.w                $AA74
  1190.         EndM
  1191.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1192.         IMPORT_CFM_FUNCTION DrawThemeMenuItem
  1193.     ENDIF
  1194.  
  1195. ;
  1196. ; pascal OSStatus DrawThemeMenuSeparator(const Rect *inItemRect)
  1197. ;
  1198.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1199.         Macro
  1200.         _DrawThemeMenuSeparator
  1201.             move.w              #$001E,D0
  1202.             dc.w                $AA74
  1203.         EndM
  1204.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1205.         IMPORT_CFM_FUNCTION DrawThemeMenuSeparator
  1206.     ENDIF
  1207.  
  1208. ;
  1209. ; pascal OSStatus GetThemeMenuSeparatorHeight(SInt16 *outHeight)
  1210. ;
  1211.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1212.         Macro
  1213.         _GetThemeMenuSeparatorHeight
  1214.             move.w              #$001F,D0
  1215.             dc.w                $AA74
  1216.         EndM
  1217.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1218.         IMPORT_CFM_FUNCTION GetThemeMenuSeparatorHeight
  1219.     ENDIF
  1220.  
  1221. ;
  1222. ; pascal OSStatus GetThemeMenuItemExtra(ThemeMenuItemType inItemType, SInt16 *outHeight, SInt16 *outWidth)
  1223. ;
  1224.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1225.         Macro
  1226.         _GetThemeMenuItemExtra
  1227.             move.w              #$0020,D0
  1228.             dc.w                $AA74
  1229.         EndM
  1230.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1231.         IMPORT_CFM_FUNCTION GetThemeMenuItemExtra
  1232.     ENDIF
  1233.  
  1234. ;
  1235. ; pascal OSStatus GetThemeMenuTitleExtra(SInt16 *outWidth, Boolean inIsSquished)
  1236. ;
  1237.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1238.         Macro
  1239.         _GetThemeMenuTitleExtra
  1240.             move.w              #$0021,D0
  1241.             dc.w                $AA74
  1242.         EndM
  1243.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1244.         IMPORT_CFM_FUNCTION GetThemeMenuTitleExtra
  1245.     ENDIF
  1246.  
  1247. ; ——————————————————————————————— BEGIN APPEARANCE 1.1 —————————————————————————————————————————————
  1248. ; —————————————————————————————————— THEME SWITCHING ———————————————————————————————————————————————
  1249. ;
  1250. ; pascal OSStatus GetTheme(Collection ioCollection)
  1251. ;
  1252.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1253.         IMPORT_CFM_FUNCTION GetTheme
  1254.     ENDIF
  1255.  
  1256. ;
  1257. ; pascal OSStatus SetTheme(Collection ioCollection)
  1258. ;
  1259.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1260.         IMPORT_CFM_FUNCTION SetTheme
  1261.     ENDIF
  1262.  
  1263. ;
  1264. ; pascal OSStatus IterateThemes(ThemeIteratorUPP inProc, void *inUserData)
  1265. ;
  1266.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1267.         IMPORT_CFM_FUNCTION IterateThemes
  1268.     ENDIF
  1269.  
  1270. ; ———————————————————————————————————————— TABS ————————————————————————————————————————————————————
  1271. ;
  1272. ; pascal OSStatus DrawThemeTabPane(const Rect *inRect, ThemeDrawState inState)
  1273. ;
  1274.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1275.         IMPORT_CFM_FUNCTION DrawThemeTabPane
  1276.     ENDIF
  1277.  
  1278. ;
  1279. ; pascal OSStatus DrawThemeTab(const Rect *inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection, ThemeTabTitleDrawUPP labelProc, UInt32 userData)
  1280. ;
  1281.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1282.         IMPORT_CFM_FUNCTION DrawThemeTab
  1283.     ENDIF
  1284.  
  1285. ;
  1286. ; pascal OSStatus GetThemeTabRegion(const Rect *inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection, RgnHandle ioRgn)
  1287. ;
  1288.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1289.         IMPORT_CFM_FUNCTION GetThemeTabRegion
  1290.     ENDIF
  1291.  
  1292. ; ——————————————————————————————————————— CURSORS ——————————————————————————————————————————————————
  1293. ;
  1294. ; pascal OSStatus SetThemeCursor(ThemeCursor inCursor)
  1295. ;
  1296.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1297.         IMPORT_CFM_FUNCTION SetThemeCursor
  1298.     ENDIF
  1299.  
  1300. ;
  1301. ; pascal OSStatus SetAnimatedThemeCursor(ThemeCursor inCursor, UInt32 inAnimationStep)
  1302. ;
  1303.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1304.         IMPORT_CFM_FUNCTION SetAnimatedThemeCursor
  1305.     ENDIF
  1306.  
  1307. ; ———————————————————————————————— CONTROL STYLE SETTINGS ——————————————————————————————————————————
  1308. ;
  1309. ; pascal OSStatus GetThemeScrollBarThumbStyle(ThemeScrollBarThumbStyle *outStyle)
  1310. ;
  1311.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1312.         IMPORT_CFM_FUNCTION GetThemeScrollBarThumbStyle
  1313.     ENDIF
  1314.  
  1315. ;
  1316. ; pascal OSStatus GetThemeScrollBarArrowStyle(ThemeScrollBarArrowStyle *outStyle)
  1317. ;
  1318.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1319.         IMPORT_CFM_FUNCTION GetThemeScrollBarArrowStyle
  1320.     ENDIF
  1321.  
  1322. ;
  1323. ; pascal OSStatus GetThemeCheckBoxStyle(ThemeCheckBoxStyle *outStyle)
  1324. ;
  1325.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1326.         IMPORT_CFM_FUNCTION GetThemeCheckBoxStyle
  1327.     ENDIF
  1328.  
  1329. ; ———————————————————————————————————————— FONTS ———————————————————————————————————————————————————
  1330. ;
  1331. ; pascal OSStatus UseThemeFont(ThemeFontID inFontID, ScriptCode inScript)
  1332. ;
  1333.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1334.         IMPORT_CFM_FUNCTION UseThemeFont
  1335.     ENDIF
  1336.  
  1337. ;
  1338. ; pascal OSStatus GetThemeFont(ThemeFontID inFontID, ScriptCode inScript, StringPtr outFontName, SInt16 *outFontSize, Style *outStyle)
  1339. ;
  1340.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1341.         IMPORT_CFM_FUNCTION GetThemeFont
  1342.     ENDIF
  1343.  
  1344. ; ———————————————————————————————————————— TRACKS ——————————————————————————————————————————————————
  1345. ;
  1346. ; pascal OSStatus DrawThemeTrack(const ThemeTrackDrawInfo *drawInfo, RgnHandle rgnGhost, ThemeEraseUPP eraseProc, UInt32 eraseData)
  1347. ;
  1348.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1349.         IMPORT_CFM_FUNCTION DrawThemeTrack
  1350.     ENDIF
  1351.  
  1352. ;
  1353. ; pascal Boolean HitTestThemeTrack(const ThemeTrackDrawInfo *drawInfo, Point mousePoint, ControlPartCode *partHit)
  1354. ;
  1355.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1356.         IMPORT_CFM_FUNCTION HitTestThemeTrack
  1357.     ENDIF
  1358.  
  1359. ;
  1360. ; pascal OSStatus GetThemeTrackBounds(const ThemeTrackDrawInfo *drawInfo, Rect *bounds)
  1361. ;
  1362.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1363.         IMPORT_CFM_FUNCTION GetThemeTrackBounds
  1364.     ENDIF
  1365.  
  1366. ;
  1367. ; pascal OSStatus GetThemeTrackThumbRgn(const ThemeTrackDrawInfo *drawInfo, RgnHandle thumbRgn)
  1368. ;
  1369.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1370.         IMPORT_CFM_FUNCTION GetThemeTrackThumbRgn
  1371.     ENDIF
  1372.  
  1373. ;
  1374. ; pascal OSStatus GetThemeTrackDragRect(const ThemeTrackDrawInfo *drawInfo, Rect *dragRect)
  1375. ;
  1376.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1377.         IMPORT_CFM_FUNCTION GetThemeTrackDragRect
  1378.     ENDIF
  1379.  
  1380. ;
  1381. ; pascal OSStatus DrawThemeTrackTickMarks(const ThemeTrackDrawInfo *drawInfo, ItemCount numTicks, ThemeEraseUPP eraseProc, UInt32 eraseData)
  1382. ;
  1383.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1384.         IMPORT_CFM_FUNCTION DrawThemeTrackTickMarks
  1385.     ENDIF
  1386.  
  1387. ;
  1388. ; pascal OSStatus GetThemeTrackThumbPositionFromOffset(const ThemeTrackDrawInfo *drawInfo, Point thumbOffset, SInt32 *relativePosition)
  1389. ;
  1390.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1391.         IMPORT_CFM_FUNCTION GetThemeTrackThumbPositionFromOffset
  1392.     ENDIF
  1393.  
  1394. ;
  1395. ; pascal OSStatus GetThemeTrackThumbPositionFromRegion(const ThemeTrackDrawInfo *drawInfo, RgnHandle thumbRgn, SInt32 *relativePosition)
  1396. ;
  1397.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1398.         IMPORT_CFM_FUNCTION GetThemeTrackThumbPositionFromRegion
  1399.     ENDIF
  1400.  
  1401. ;
  1402. ; pascal OSStatus GetThemeTrackLiveValue(const ThemeTrackDrawInfo *drawInfo, SInt32 relativePosition, SInt32 *value)
  1403. ;
  1404.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1405.         IMPORT_CFM_FUNCTION GetThemeTrackLiveValue
  1406.     ENDIF
  1407.  
  1408. ; ——————————————————————————————————— SCROLLBAR ARROWS —————————————————————————————————————————————
  1409. ;
  1410. ; pascal OSStatus DrawThemeScrollBarArrows(const Rect *bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Rect *trackBounds)
  1411. ;
  1412.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1413.         IMPORT_CFM_FUNCTION DrawThemeScrollBarArrows
  1414.     ENDIF
  1415.  
  1416. ;
  1417. ; pascal OSStatus GetThemeScrollBarTrackRect(const Rect *bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Rect *trackBounds)
  1418. ;
  1419.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1420.         IMPORT_CFM_FUNCTION GetThemeScrollBarTrackRect
  1421.     ENDIF
  1422.  
  1423. ;
  1424. ; pascal Boolean HitTestThemeScrollBarArrows(const Rect *scrollBarBounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Point ptHit, Rect *trackBounds, ControlPartCode *partcode)
  1425. ;
  1426.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1427.         IMPORT_CFM_FUNCTION HitTestThemeScrollBarArrows
  1428.     ENDIF
  1429.  
  1430. ; ———————————————————————————————————————— WINDOWS —————————————————————————————————————————————————
  1431. ;
  1432. ; pascal OSStatus GetThemeWindowRegion(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, WindowRegionCode winRegion, RgnHandle rgn)
  1433. ;
  1434.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1435.         IMPORT_CFM_FUNCTION GetThemeWindowRegion
  1436.     ENDIF
  1437.  
  1438. ;
  1439. ; pascal OSStatus DrawThemeWindowFrame(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, WindowTitleDrawingUPP titleProc, UInt32 titleData)
  1440. ;
  1441.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1442.         IMPORT_CFM_FUNCTION DrawThemeWindowFrame
  1443.     ENDIF
  1444.  
  1445. ;
  1446. ; pascal OSStatus DrawThemeTitleBarWidget(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, ThemeTitleBarWidget widget)
  1447. ;
  1448.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1449.         IMPORT_CFM_FUNCTION DrawThemeTitleBarWidget
  1450.     ENDIF
  1451.  
  1452. ;
  1453. ; pascal Boolean GetThemeWindowRegionHit(ThemeWindowType flavor, const Rect *inContRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes inAttributes, Point inPoint, WindowRegionCode *outRegionHit)
  1454. ;
  1455.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1456.         IMPORT_CFM_FUNCTION GetThemeWindowRegionHit
  1457.     ENDIF
  1458.  
  1459. ;
  1460. ; pascal OSStatus DrawThemeScrollBarDelimiters(ThemeWindowType flavor, const Rect *inContRect, ThemeDrawState state, ThemeWindowAttributes attributes)
  1461. ;
  1462.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1463.         IMPORT_CFM_FUNCTION DrawThemeScrollBarDelimiters
  1464.     ENDIF
  1465.  
  1466. ; ———————————————————————————————————————— BUTTONS —————————————————————————————————————————————————
  1467. ;
  1468. ; pascal OSStatus DrawThemeButton(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inNewInfo, const ThemeButtonDrawInfo *inPrevInfo, ThemeEraseUPP inEraseProc, ThemeButtonDrawUPP inLabelProc, UInt32 inUserData)
  1469. ;
  1470.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1471.         IMPORT_CFM_FUNCTION DrawThemeButton
  1472.     ENDIF
  1473.  
  1474. ;
  1475. ; pascal OSStatus GetThemeButtonRegion(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inNewInfo, RgnHandle outRegion)
  1476. ;
  1477.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1478.         IMPORT_CFM_FUNCTION GetThemeButtonRegion
  1479.     ENDIF
  1480.  
  1481. ;
  1482. ; pascal OSStatus GetThemeButtonContentBounds(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inDrawInfo, Rect *outBounds)
  1483. ;
  1484.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1485.         IMPORT_CFM_FUNCTION GetThemeButtonContentBounds
  1486.     ENDIF
  1487.  
  1488. ;
  1489. ; pascal OSStatus GetThemeButtonBackgroundBounds(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inDrawInfo, Rect *outBounds)
  1490. ;
  1491.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1492.         IMPORT_CFM_FUNCTION GetThemeButtonBackgroundBounds
  1493.     ENDIF
  1494.  
  1495.  
  1496. ; ————————————————————————————————————— INTERFACE SOUNDS ———————————————————————————————————————————
  1497. ;
  1498. ; pascal OSStatus PlayThemeSound(ThemeSoundKind kind)
  1499. ;
  1500.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1501.         Macro
  1502.         _PlayThemeSound
  1503.             move.w              #$0026,D0
  1504.             dc.w                $AA74
  1505.         EndM
  1506.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1507.         IMPORT_CFM_FUNCTION PlayThemeSound
  1508.     ENDIF
  1509.  
  1510. ;
  1511. ; pascal OSStatus BeginThemeDragSound(ThemeDragSoundKind kind)
  1512. ;
  1513.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1514.         Macro
  1515.         _BeginThemeDragSound
  1516.             move.w              #$0027,D0
  1517.             dc.w                $AA74
  1518.         EndM
  1519.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1520.         IMPORT_CFM_FUNCTION BeginThemeDragSound
  1521.     ENDIF
  1522.  
  1523. ;
  1524. ; pascal OSStatus EndThemeDragSound(void)
  1525. ;
  1526.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1527.         Macro
  1528.         _EndThemeDragSound
  1529.             move.w              #$0028,D0
  1530.             dc.w                $AA74
  1531.         EndM
  1532.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1533.         IMPORT_CFM_FUNCTION EndThemeDragSound
  1534.     ENDIF
  1535.  
  1536. ; —————————————————————————————————————— PRIMITIVES ————————————————————————————————————————————————
  1537. ;
  1538. ; pascal OSStatus DrawThemeTickMark(const Rect *bounds, ThemeDrawState state)
  1539. ;
  1540.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1541.         IMPORT_CFM_FUNCTION DrawThemeTickMark
  1542.     ENDIF
  1543.  
  1544. ;
  1545. ; pascal OSStatus DrawThemeChasingArrows(const Rect *bounds, UInt32 index, ThemeDrawState state, ThemeEraseUPP eraseProc, UInt32 eraseData)
  1546. ;
  1547.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1548.         IMPORT_CFM_FUNCTION DrawThemeChasingArrows
  1549.     ENDIF
  1550.  
  1551. ;
  1552. ; pascal OSStatus DrawThemePopupArrow(const Rect *bounds, ThemeArrowOrientation orientation, ThemePopupArrowSize size, ThemeDrawState state, ThemeEraseUPP eraseProc, UInt32 eraseData)
  1553. ;
  1554.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1555.         IMPORT_CFM_FUNCTION DrawThemePopupArrow
  1556.     ENDIF
  1557.  
  1558. ;
  1559. ; pascal OSStatus DrawThemeStandaloneGrowBox(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state)
  1560. ;
  1561.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1562.         IMPORT_CFM_FUNCTION DrawThemeStandaloneGrowBox
  1563.     ENDIF
  1564.  
  1565. ;
  1566. ; pascal OSStatus DrawThemeStandaloneNoGrowBox(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state)
  1567. ;
  1568.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1569.         IMPORT_CFM_FUNCTION DrawThemeStandaloneNoGrowBox
  1570.     ENDIF
  1571.  
  1572. ;
  1573. ; pascal OSStatus GetThemeStandaloneGrowBoxBounds(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, Rect *bounds)
  1574. ;
  1575.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1576.         IMPORT_CFM_FUNCTION GetThemeStandaloneGrowBoxBounds
  1577.     ENDIF
  1578.  
  1579. ; ————————————————————————————————————— DRAWING STATE ——————————————————————————————————————————————
  1580. ;  The following routines help you save and restore the drawing state in a theme-savvy manner. With    
  1581. ;  these weapons in your arsenal, there is no grafport you cannot tame.    Use ThemeGetDrawingState to    
  1582. ;  get the current drawing settings for the current port. It will return an opaque object for you     
  1583. ;  to pass into ThemeSetDrawingState later on. When you are finished with the state, call the        
  1584. ;  ThemeDisposeDrawingState routine. You can alternatively pass true into the inDisposeNow             
  1585. ;  parameter of the ThemeSetDrawingState routine.  You can use this routine to copy the drawing        
  1586. ;  state from one port to another as well.                                                            
  1587. ;
  1588. ; pascal OSStatus NormalizeThemeDrawingState(void)
  1589. ;
  1590.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1591.         IMPORT_CFM_FUNCTION NormalizeThemeDrawingState
  1592.     ENDIF
  1593.  
  1594. ;
  1595. ; pascal OSStatus GetThemeDrawingState(ThemeDrawingState *outState)
  1596. ;
  1597.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1598.         IMPORT_CFM_FUNCTION GetThemeDrawingState
  1599.     ENDIF
  1600.  
  1601. ;
  1602. ; pascal OSStatus SetThemeDrawingState(ThemeDrawingState inState, Boolean inDisposeNow)
  1603. ;
  1604.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1605.         IMPORT_CFM_FUNCTION SetThemeDrawingState
  1606.     ENDIF
  1607.  
  1608. ;
  1609. ; pascal OSStatus DisposeThemeDrawingState(ThemeDrawingState inState)
  1610. ;
  1611.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1612.         IMPORT_CFM_FUNCTION DisposeThemeDrawingState
  1613.     ENDIF
  1614.  
  1615. ; ————————————————————————————————————— MISCELLANEOUS ——————————————————————————————————————————————
  1616. ;  ApplyThemeBackground is used to set up the background for embedded controls     
  1617. ;  It is normally called by controls that are embedders. The standard controls    
  1618. ;  call this API to ensure a correct background for the current theme. You pass 
  1619. ;  in the same rectangle you would if you were calling the drawing primitive.    
  1620. ;
  1621. ; pascal OSStatus ApplyThemeBackground(ThemeBackgroundKind inKind, const Rect *bounds, ThemeDrawState inState, SInt16 inDepth, Boolean inColorDev)
  1622. ;
  1623.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1624.         IMPORT_CFM_FUNCTION ApplyThemeBackground
  1625.     ENDIF
  1626.  
  1627. ;
  1628. ; pascal OSStatus SetThemeTextColorForWindow(WindowPtr window, Boolean isActive, SInt16 depth, Boolean isColorDev)
  1629. ;
  1630.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1631.         IMPORT_CFM_FUNCTION SetThemeTextColorForWindow
  1632.     ENDIF
  1633.  
  1634. ;
  1635. ; pascal Boolean IsValidAppearanceFileType(OSType fileType)
  1636. ;
  1637.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1638.         IMPORT_CFM_FUNCTION IsValidAppearanceFileType
  1639.     ENDIF
  1640.  
  1641. ;
  1642. ; pascal OSStatus GetThemeBrushAsColor(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev, RGBColor *outColor)
  1643. ;
  1644.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1645.         IMPORT_CFM_FUNCTION GetThemeBrushAsColor
  1646.     ENDIF
  1647.  
  1648. ;
  1649. ; pascal OSStatus GetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev, RGBColor *outColor)
  1650. ;
  1651.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1652.         IMPORT_CFM_FUNCTION GetThemeTextColor
  1653.     ENDIF
  1654.  
  1655. ; ——————————————————————————————————————————————————————————————————————————————————————————————————
  1656. ;  Obsolete symbolic names                                                                            
  1657. ; ——————————————————————————————————————————————————————————————————————————————————————————————————
  1658. ;  Obsolete error codes - use the new ones, s'il vous plait / kudasai 
  1659.  
  1660. appearanceBadBrushIndexErr        EQU        -30560                ; pattern index invalid 
  1661. appearanceProcessRegisteredErr    EQU        -30561
  1662. appearanceProcessNotRegisteredErr EQU    -30562
  1663. appearanceBadTextColorIndexErr    EQU        -30563
  1664. appearanceThemeHasNoAccents        EQU        -30564
  1665. appearanceBadCursorIndexErr        EQU        -30565
  1666.  
  1667. kThemeActiveDialogBackgroundBrush EQU    1
  1668. kThemeInactiveDialogBackgroundBrush EQU    2
  1669. kThemeActiveAlertBackgroundBrush EQU    3
  1670. kThemeInactiveAlertBackgroundBrush EQU    4
  1671. kThemeActiveModelessDialogBackgroundBrush EQU 5
  1672. kThemeInactiveModelessDialogBackgroundBrush EQU 6
  1673. kThemeActiveUtilityWindowBackgroundBrush EQU 7
  1674. kThemeInactiveUtilityWindowBackgroundBrush EQU 8
  1675. kThemeListViewSortColumnBackgroundBrush EQU 9
  1676. kThemeListViewBackgroundBrush    EQU        10
  1677. kThemeIconLabelBackgroundBrush    EQU        11
  1678. kThemeListViewSeparatorBrush    EQU        12
  1679. kThemeChasingArrowsBrush        EQU        13
  1680. kThemeDragHiliteBrush            EQU        14
  1681. kThemeDocumentWindowBackgroundBrush EQU    15
  1682. kThemeFinderWindowBackgroundBrush EQU    16
  1683.  
  1684. kThemeActiveScrollBarDelimiterBrush EQU    17
  1685. kThemeInactiveScrollBarDelimiterBrush EQU 18
  1686. kThemeFocusHighlightBrush        EQU        19
  1687. kThemeActivePopupArrowBrush        EQU        20
  1688. kThemePressedPopupArrowBrush    EQU        21
  1689. kThemeInactivePopupArrowBrush    EQU        22
  1690. kThemeAppleGuideCoachmarkBrush    EQU        23
  1691.  
  1692. kThemeActiveDialogTextColor        EQU        1
  1693. kThemeInactiveDialogTextColor    EQU        2
  1694. kThemeActiveAlertTextColor        EQU        3
  1695. kThemeInactiveAlertTextColor    EQU        4
  1696. kThemeActiveModelessDialogTextColor EQU    5
  1697. kThemeInactiveModelessDialogTextColor EQU 6
  1698. kThemeActiveWindowHeaderTextColor EQU    7
  1699. kThemeInactiveWindowHeaderTextColor EQU    8
  1700. kThemeActivePlacardTextColor    EQU        9
  1701. kThemeInactivePlacardTextColor    EQU        10
  1702. kThemePressedPlacardTextColor    EQU        11
  1703. kThemeActivePushButtonTextColor    EQU        12
  1704. kThemeInactivePushButtonTextColor EQU    13
  1705. kThemePressedPushButtonTextColor EQU    14
  1706. kThemeActiveBevelButtonTextColor EQU    15
  1707. kThemeInactiveBevelButtonTextColor EQU    16
  1708. kThemePressedBevelButtonTextColor EQU    17
  1709. kThemeActivePopupButtonTextColor EQU    18
  1710. kThemeInactivePopupButtonTextColor EQU    19
  1711. kThemePressedPopupButtonTextColor EQU    20
  1712. kThemeIconLabelTextColor        EQU        21
  1713. kThemeListViewTextColor            EQU        22
  1714.  
  1715. kThemeActiveDocumentWindowTitleTextColor EQU 23
  1716. kThemeInactiveDocumentWindowTitleTextColor EQU 24
  1717. kThemeActiveMovableModalWindowTitleTextColor EQU 25
  1718. kThemeInactiveMovableModalWindowTitleTextColor EQU 26
  1719. kThemeActiveUtilityWindowTitleTextColor EQU 27
  1720. kThemeInactiveUtilityWindowTitleTextColor EQU 28
  1721. kThemeActivePopupWindowTitleColor EQU    29
  1722. kThemeInactivePopupWindowTitleColor EQU    30
  1723. kThemeActiveRootMenuTextColor    EQU        31
  1724. kThemeSelectedRootMenuTextColor    EQU        32
  1725. kThemeDisabledRootMenuTextColor    EQU        33
  1726. kThemeActiveMenuItemTextColor    EQU        34
  1727. kThemeSelectedMenuItemTextColor    EQU        35
  1728. kThemeDisabledMenuItemTextColor    EQU        36
  1729. kThemeActivePopupLabelTextColor    EQU        37
  1730. kThemeInactivePopupLabelTextColor EQU    38
  1731.  
  1732. kAEThemeSwitch                    EQU        'thme'                ; Event ID's: Theme Switched 
  1733.  
  1734. kThemeNoAdornment                EQU        0
  1735. kThemeDefaultAdornment            EQU        $01
  1736. kThemeFocusAdornment            EQU        $04
  1737. kThemeRightToLeftAdornment        EQU        $10
  1738. kThemeDrawIndicatorOnly            EQU        $20
  1739.  
  1740. kThemeBrushPassiveAreaFill        EQU        25
  1741.     ENDIF ; __APPEARANCE__ 
  1742.  
  1743.